import React from "react";
import { Divider } from 'antd';
import { connect } from 'react-redux'
function Mydata(props) {
  // console.log('props', props);
  const username = props.state.userInfo.username
  const logindate = props.state.userInfo.logindate
  const regdate = props.state.userInfo.regdate
  // console.log(regdate);
  return (
    <>
      <p>
        用户名：{username}
      </p>
      <Divider />
      <p>
        Email地址:用于密码找回，建议绑定
      </p>
      <Divider />
      <p>
        注册时间：{regdate}
      </p>
      <Divider />
      <p>
        登陆IP:
      </p>
      <Divider />
      <p>
        登陆时间：{logindate}
      </p>
      <Divider />
      <p>
        推广链接：<a>http://www.grab4k.com/index.php/user/reg.html?uid=60764</a>
      </p>
      <Divider />

    </>
  )
}

const mapStateToProps = function (state) {
  console.log('state', state);
  return { state }
}
const mapDispatchToProps = function () {
  return {
    // logout() {
    //   // dispatch({ type: 'logout' })
    // }
  }
}
Mydata = connect(mapStateToProps, mapDispatchToProps)(Mydata)
export default Mydata